<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jstl/core"
                template="/template_content_admin.xhtml">

<ui:define name="conteudo">
    <h2>Listagem:</h2>
    <h:form>
        <h:panelGroup id="messagePanel" layout="block">
            <h:messages errorClass="messagesErro" infoClass="messagesInfo" layout="table"/>
        </h:panelGroup>
        <br/>
        <center>
            <h:panelGrid columns="1">
                <f:facet name="header">
                    <h:outputText value="Veja aqui a lista dos nossos pratos"/>
                </f:facet>
                <rich:dataTable value="#{cardapio.findCardapioEntities}" var="item" style="text-align:center">
                    <f:facet name="header">
                        <h:outputText value="#{msg['listar_cardapio']}" />
                    </f:facet>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText value="Id"/>
                            </f:facet>
                            <h:outputText value=" #{item.id}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg['nome_prato']}"/>
                            </f:facet>
                            <h:outputText value=" #{item.produto}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg['descricao']}"/>
                            </f:facet>
                            <h:outputText value=" #{item.descricao}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg['preco']}"/>
                            </f:facet>
                            <h:outputText value=" #{item.preco}"/>
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">
                                <h:outputText value="Ação"/>
                            </f:facet>
                            <!--<h:commandLink value="Mostrar" action="#{cardapio.detailSetup}">
                                <f:param name="jsfcrud.currentCardapio" value="#{jsfcrud_class['entidades.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][cardapio.converter].jsfcrud_invoke}"/>
                            </h:commandLink>
                            <h:outputText value=" "/>
                            <h:commandLink value="#{msg['editar']}" action="#{cardapio.editSetup}">
                                <f:param name="jsfcrud.currentCardapio" value="#{jsfcrud_class['entidades.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][cardapio.converter].jsfcrud_invoke}"/>
                            </h:commandLink>
                            <h:outputText value=" "/> -->
                            <h:commandLink value="#{msg['excluir']}" action="#{cardapio.destroy}">
                                <f:param name="jsfcrud.currentCardapio" value="#{jsfcrud_class['entidades.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][cardapio.converter].jsfcrud_invoke}"/>
                            </h:commandLink>
                        </rich:column>
                </rich:dataTable>
            </h:panelGrid>
        </center>
        <h:panelGrid columns="2">
            <h:commandButton id="add" styleClass="buttonK" value="#{msg['novo']}" action="#{cardapio.novoCardapio}" />
        </h:panelGrid>
    </h:form>
</ui:define>

</ui:composition>

